#include<stdio.h>

int main(void) {
    int n;
    double height, s;
    scanf("%lf,%d",&height, &n);
    s = height;
    for(int i = 1; i <= n; i++){
        s += height;
        height /= 2;

    }
    s -= height * 2;
    printf("%.1lf,%.1lf", s, height);
    return 0;
    
}
